import { defineStore } from 'pinia';
import type { NotificationItem } from '@/types/interface';

// @ts-nocheck
interface LogsType {
  id: number;
  userName: string;
  refType: number;
  refId: number;
  refName: string;
}
interface MembersType {
  isOneself: Boolean;
  phone: string;
  company: string;
  email: string;
  auditStatus: number;
  name: string;
}
interface UnitType {
  id: number;
  level?: number;
  number?: number;
  parentId?: number;
  remarks?: string;
  sort?: number;
  text: string;
  type?: number;
  value?: string;
}
interface projectData {
  coverUrl: string;
  createDate: string;
  isAsterisk: Boolean;
  name: string;
  description: string;
  createUserName: string;
  projectId: number | string;
  publishStatus: number;
  role: number;
  logs: Array<LogsType>;
  members: Array<MembersType>;
}
interface StyleInfo {
  background: string;
}
export const useProjectStore = defineStore('project', {
  state: () => ({
    id: 0,
    delId: 0,
    moduleList: {
      projectId: 0,
      parentId: 0,
      sort: [],
    },
    heartbeatCurrent: 0, //页面心跳值
    modelIndex: false, //辅助信息弹框层级
    auxiliaryId: 0, //辅助信息id
    auxiliaryvisible: false, //辅助信息弹框
    auxiliaryTitleType: 1, //辅助信息弹框类型（新增/编辑/查看）
    auxiliaryType: false, //更新状态
    template9ScrollType: false,
    template9MenuShow: true, //模版9置顶按钮显示
    AddUnitstatus: false,
    planChildType: false,
    tabvalue: 1,
    uploadModel: false,
    drawerShow: false,
    visitExhibitsInfoShow: false,
    descriptionExhibitsInfoShow: false,
    textInfoShow: false,
    templateUnitType: false, //书画模板首页控制
    templateType: 0,
    correlationModuleId: 0,
    exhibitsDescription: '',
    tempalte4Audio: {
      type: 3,
      url: '',
      description: '',
      name: '',
    },
    exhibitsName: '',
    scrollBox: 0,
    isUnitTem6: -1,
    isCollectBtn: true,
    isBack: false,
    template4showModeel: false,
    getUnitSlectInfo: {
      id: 0,
      level: 0,
      number: 0,
      parentId: 0,
      remarks: '',
      sort: 0,
      text: '',
      type: 1,
      value: '',
    },
    glanceOver: false,
    linkType: false,
    childModel: {
      id: 0,
      level: 0,
      number: 0,
      parentId: 0,
      remarks: '',
      sort: 0,
      text: '',
      type: 1,
      value: '',
      auxiliaryTotal: 0,
      children: [],
    },
    digitalShowroom: '',
    parentId: 0,
    projectRole: 3,
    styleInfo: {
      logo: null,
      moduleList: [
        {
          type: 46,
          number: 6,
          showpieceTotal: 0,
          subTitle: '',
          isAuxiliary: false,
          auxiliaryTotal: 0,
          children: [
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 557424321527877,
              parentId: 557423604850757,
              text: '插翼宿鸟式',
              value: '/369462942949445/file/554223975075909/show/202406/557424608014405.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 557424335220805,
              parentId: 557423604850757,
              text: '飞翔露背式',
              value: '/369462942949445/file/554223975075909/show/202406/557424721576005.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 557424349859909,
              parentId: 557423604850757,
              text: '飞翔露胸腹式',
              value: '/369462942949445/file/554223975075909/show/202406/557424801312837.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 557424888361029,
              parentId: 557423604850757,
              text: '俯视露背',
              value: '/369462942949445/file/554223975075909/show/202406/557424995930181.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 557424893177925,
              parentId: 557423604850757,
              text: '俯视露背式',
              value: '/369462942949445/file/554223975075909/show/202406/557425107083333.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 557424895598661,
              parentId: 557423604850757,
              text: '俯视露胸腹式',
              value: '/369462942949445/file/554223975075909/show/202407/563811792633925.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 557424897974341,
              parentId: 557423604850757,
              text: '搜背式',
              value: '/369462942949445/file/554223975075909/show/202406/557425324089413.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 557425361621061,
              parentId: 557423604850757,
              text: '搜腹式',
              value: '/369462942949445/file/554223975075909/show/202406/557425445404741.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 557425366339653,
              parentId: 557423604850757,
              text: '搜尾式',
              value: '/369462942949445/file/554223975075909/show/202406/557425521635397.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 557425368682565,
              parentId: 557423604850757,
              text: '仰望露背式',
              value: '/369462942949445/file/554223975075909/show/202406/557425594437701.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 557425646096453,
              parentId: 557423604850757,
              text: '仰望露胸腹',
              value: '/369462942949445/file/554223975075909/show/202406/557425713299525.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
          ],
          id: 557423604850757,
          parentId: 0,
          text: '写意翎毛基本画法',
          value: '',
          remarks: '',
          sort: 10,
          level: 1,
        },
        {
          type: 46,
          number: 6,
          showpieceTotal: 0,
          subTitle: '',
          isAuxiliary: false,
          auxiliaryTotal: 0,
          children: [
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 563744602759237,
              parentId: 557424087040069,
              text: '白描',
              value: '/369462942949445/file/554223975075909/show/202407/563782157889605.jpg',
              remarks: '白描民俗风情图册 广东省博物馆藏',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 1,
              children: [],
              id: 563744607494213,
              parentId: 557424087040069,
              text: '点垛',
              value: '/369462942949445/file/554223975075909/show/202407/563782744129605.jpg',
              remarks: '清朱耷芦雁图轴 广东省博物馆藏',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 563744609673285,
              parentId: 557424087040069,
              text: '点染',
              value: '/369462942949445/file/554223975075909/show/202407/563783683649605.jpg',
              remarks: '任颐花鸟芭蕉轴 广东省博物馆藏',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 563744611536965,
              parentId: 557424087040069,
              text: '工笔重彩',
              value: '/369462942949445/file/554223975075909/show/202407/563783794937925.jpg',
              remarks: '仿蒋廷锡花鸟图轴  广东省博物馆藏',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 563744613412933,
              parentId: 557424087040069,
              text: '勾染',
              value: '/369462942949445/file/554223975075909/show/202407/563783950598213.jpg',
              remarks: '边景昭雪梅双鹤图轴   广东省博物馆藏',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 563744615997509,
              parentId: 557424087040069,
              text: '兼工带写',
              value: '/369462942949445/file/554223975075909/show/202407/563784688255045.jpg',
              remarks: '明林良松鹤图轴   广东省博物馆藏',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 563784714309701,
              parentId: 557424087040069,
              text: '没骨',
              value: '/369462942949445/file/554223975075909/show/202407/563784820551749.jpg',
              remarks: '明林良雪景双鹰图轴   广东省博物馆藏',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 563784719753285,
              parentId: 557424087040069,
              text: '披蓑',
              value: '/369462942949445/file/554223975075909/show/202407/563784924729413.jpg',
              remarks: '清华喦花鸟轴   广东省博物馆藏',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 563784722231365,
              parentId: 557424087040069,
              text: '丝毛',
              value: '/369462942949445/file/554223975075909/show/202407/563785262440517.jpg',
              remarks: '清华嵒葵花画眉图   广东省博物馆藏',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 563785288233029,
              parentId: 557424087040069,
              text: '指画',
              value: '/369462942949445/file/554223975075909/show/202407/563785371967557.jpg',
              remarks: '潘天寿老鹰 广东省博物馆藏',
              sort: 9999,
              level: 2,
            },
          ],
          id: 557424087040069,
          parentId: 0,
          text: '翎毛技法图示',
          value: '',
          remarks: '',
          sort: 30,
          level: 1,
        },
        {
          type: 46,
          number: 6,
          showpieceTotal: 0,
          subTitle: '',
          isAuxiliary: false,
          auxiliaryTotal: 0,
          children: [
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 2,
              children: [],
              id: 559910741164101,
              parentId: 557433237844037,
              text: '1.高古游丝描',
              value: '/369462942949445/file/554223975075909/show/202406/562711210631237.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 2,
              children: [],
              id: 559910746824773,
              parentId: 557433237844037,
              text: '2.琴弦描',
              value: '/369462942949445/file/554223975075909/show/202406/562711397892165.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 2,
              children: [],
              id: 559910761480261,
              parentId: 557433237844037,
              text: '3.铁线描',
              value: '/369462942949445/file/554223975075909/show/202406/562711485743173.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 2,
              children: [],
              id: 559913621348421,
              parentId: 557433237844037,
              text: '4.行云流水描',
              value: '/369462942949445/file/554223975075909/show/202406/562711517257797.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 2,
              children: [],
              id: 559913625215045,
              parentId: 557433237844037,
              text: '5.马蝗描',
              value: '/369462942949445/file/554223975075909/show/202406/562711549243461.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 2,
              children: [],
              id: 559913627168837,
              parentId: 557433237844037,
              text: '6.钉头鼠尾描',
              value: '/369462942949445/file/554223975075909/show/202406/562711574667333.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 2,
              children: [],
              id: 559913630019653,
              parentId: 557433237844037,
              text: '7.混描',
              value: '/369462942949445/file/554223975075909/show/202406/562711613063237.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 2,
              children: [],
              id: 559915928928325,
              parentId: 557433237844037,
              text: '8.撅头丁',
              value: '/369462942949445/file/554223975075909/show/202406/562711652253765.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 2,
              children: [],
              id: 559915931217989,
              parentId: 557433237844037,
              text: '9.曹衣描',
              value: '/369462942949445/file/554223975075909/show/202406/562711715094597.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 2,
              children: [],
              id: 559915933036613,
              parentId: 557433237844037,
              text: '10.折芦描',
              value: '/369462942949445/file/554223975075909/show/202406/562711849508933.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 2,
              children: [],
              id: 559915935084613,
              parentId: 557433237844037,
              text: '11.橄榄描',
              value: '/369462942949445/file/554223975075909/show/202406/562711881056325.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 2,
              children: [],
              id: 559915937243205,
              parentId: 557433237844037,
              text: '12.枣核描',
              value: '/369462942949445/file/554223975075909/show/202406/562711914631237.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 2,
              children: [],
              id: 559924424237125,
              parentId: 557433237844037,
              text: '13.柳叶描',
              value: '/369462942949445/file/554223975075909/show/202406/562711939346501.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 2,
              children: [],
              id: 559924427395141,
              parentId: 557433237844037,
              text: '14.竹叶描',
              value: '/369462942949445/file/554223975075909/show/202406/562711969742917.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 2,
              children: [],
              id: 559924429930565,
              parentId: 557433237844037,
              text: '15.战笔水纹描',
              value: '/369462942949445/file/554223975075909/show/202406/562712000806981.jpg',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 563808707555397,
              parentId: 557433237844037,
              text: '17.枯柴描',
              value: 'null',
              remarks: '',
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 563809188769861,
              parentId: 557433237844037,
              text: '18.蚯蚓描',
              value: 'null',
              remarks: null,
              sort: 9999,
              level: 2,
            },
            {
              type: 1,
              number: 6,
              showpieceTotal: 0,
              subTitle: '',
              isAuxiliary: false,
              auxiliaryTotal: 0,
              children: [],
              id: 563809451003973,
              parentId: 557433237844037,
              text: '16.减笔描',
              value: 'null',
              remarks: null,
              sort: 9999,
              level: 2,
            },
          ],
          id: 557433237844037,
          parentId: 0,
          text: '人物画十八描',
          value: '',
          remarks:
            '人物画十八描是指古代绘画中人物衣纹的描法，源自明代邹德中在《绘事启蒙》中总结的“描法古今一十八等”，分别是高古游丝描、琴弦描、铁线描、行云流水描、马蝗描、钉头鼠尾、混描、撅头丁、曹衣描、折芦描、橄榄描、枣核描、柳叶描、竹叶描、战笔水纹描、减笔、柴笔描、蚯蚓描。在此之前，有战笔、游丝笔、曹衣出水、铁线、行云流水、减笔等描法概念散见于张彦远《历代名画记》、米芾《画史》、赵希鹄《洞天清禄集》、汤垕《画鉴》、夏文彦《图绘宝鉴》等著录中，元代王铎已将人物描法分为铁线笔、兰花笔、游丝笔、战笔四种。在邹德中之后，明代周履靖《天行道貌》、杨尔曾《图绘宗彝》、汪珂玉《珊瑚网》转引十八描概念，使其流播范围更广，并被日本南宗画家绘制成画谱，如大冈春卜《画巧潜览》、山岳柿羊羴《人物画谱》、小田百谷的《海仙十八描法》等。清代光绪年间《点石斋丛画》收录了完整的十八描图谱，对后世人物画家影响极深。',
          sort: 9999,
          level: 1,
        },
      ],
      id: 395740859879493,
      themeColor: '#CFBDA8',
      auxiliaryColor: '#F0E9E1',
      background: '#FAF9F7',
      shmentColor: '#D2AD77',
      fontColor: '#333',
      colorType: 1,
      fontFamily: 'SourceHanSerifCN',
      textFamily: 'SourceHanSerifCN',
      sizeType: 1,
      contentSize: '16px',
      titleSize: '34px',
      mintitleSize: '20px',
      styleType: 1,
      banners: [
        {
          url: '/369462942949445/file/554223975075909/show/202406/559910425374789.jpg',
          type: 1,
          link: '/369462942949445/file/554223975075909/show/202406/559910425374789.jpg',
          name: '/369462942949445/file/554223975075909/show/202406/559910425374789.jpg',
          status: 0,
        },
      ],
      wapBanners: [
        {
          url: '/369462942949445/file/554223975075909/show/202406/559910178099269.jpg',
          type: 1,
          link: '/369462942949445/file/554223975075909/show/202406/559910178099269.jpg',
          name: '/369462942949445/file/554223975075909/show/202406/559910178099269.jpg',
          status: 0,
        },
      ],
    },
    // {
    //   logo: '',
    //   moduleList: [],
    //   id: 0, //模板id
    //   projectId: 0, //模板id
    //   themeColor: '#CFBDA8', //主题色
    //   auxiliaryColor: '#F0E9E1', //辅助色
    //   background: '#FAF9F7', //背景色
    //   shmentColor: '#D2AD77', //点缀色
    //   fontColor: '#333', //字体色
    //   colorType: 1, //颜色id
    //   fontFamily: 'SourceHanSerifCN', //标题字体
    //   textFamily: 'SourceHanSerifCN', //正文字体
    //   sizeType: 1, //字体类型
    //   contentSize: '19px', //正文字号
    //   titleSize: '34px', //标题字号
    //   mintitleSize: '20px', //小标题字号
    //   styleType: 1, //风格样式
    //   banners: [], //首页轮播图
    //   wapBanners: [], //移动端轮播图
    // },
    projectInfo: {
      coverUrl: '371947843936325',
      createDate: '2023/02/01 09:24:22',
      createUserName: '',
      description: '',
      isAsterisk: true,
      logs: [],
      members: [],
      name: '恋山游',
      projectId: 0,
      publishStatus: 1,
      role: 3,
    },
    correlationExhibits: [],
    BiographyMenuType: -1,
    research7Type: false,
    template5Type: false,
    template9ExhibitsShow: false, //模版9展品图库弹框状态
    tmplate2ChildShow: {
      id: 0,
      level: 0,
      number: 0,
      parentId: 0,
      remarks: '',
      sort: 0,
      text: '',
      type: 1,
      value: '',
      children: [],
    },
    current: 0, //模板一定位二级单元
    Template6MenuType: -1,
    Template6MenuCurrent: 0,
    wapBiographyMenuType: -1, //模板六移动端
    stsyCurrent: 0, //模板14记录第一级单元
    paintingCurrent: 0, //模板18记录第一级单元
  }),
  getters: {},
  actions: {
    settempalte4Audio(e: any) {
      this.tempalte4Audio = e;
    },
    setDigitalShowroom(str?: string) {
      this.digitalShowroom = str ? str : '';
    },
    setHeartbeatCurrent(e?: boolean) {
      this.heartbeatCurrent = this.heartbeatCurrent + 1;
      if (e) {
        this.heartbeatCurrent = 0;
      }
    },
    settemplate9MenuShow(e: boolean) {
      this.template9MenuShow = e;
    },
    settemplate9ExhibitsShow(e: boolean) {
      this.template9ExhibitsShow = e;
    },
    setModelIndex(e: boolean) {
      this.modelIndex = e;
    },
    setAuxiliaryvisible(e: boolean) {
      this.auxiliaryvisible = e;
    },
    setAuxiliaryId(e: number) {
      this.auxiliaryId = e;
    },
    setAuxiliaryType() {
      this.auxiliaryType = !this.auxiliaryType;
    },
    setAuxiliaryTitleType(e: number) {
      this.auxiliaryTitleType = e;
    },
    settemplate9ScrollType(e: boolean) {
      this.template9ScrollType = e;
    },
    settmplate2ChildShow(e?: any) {
      if (e) {
        this.tmplate2ChildShow = e;
      } else {
        this.tmplate2ChildShow = {
          id: 0,
          level: 0,
          number: 0,
          parentId: 0,
          remarks: '',
          sort: 0,
          text: '',
          type: 1,
          value: '',
          children: [],
        };
      }
    },
    settemplate5Type() {
      this.template5Type = !this.template5Type;
    },
    setresearch7Type(e: boolean) {
      this.research7Type = e;
    },
    setBiographyMenuType(e: number) {
      this.BiographyMenuType = e;
    },
    setIsUnitTem6(data) {
      this.isUnitTem6 = data;
    },
    setScrollBox(data: number) {
      this.scrollBox = data;
    },
    setCorrelationModuleId(data: number | string) {
      this.correlationModuleId = data;
    },
    setGetUnitSlectInfo(data?: UnitType) {
      if (data) {
        this.getUnitSlectInfo = data;
      } else {
        this.getUnitSlectInfo = {
          id: 0,
          level: 0,
          number: 0,
          parentId: 0,
          remarks: '',
          sort: 0,
          text: '',
          type: 1,
          value: '',
        };
      }
    },
    settextInfoShow(data: boolean) {
      this.textInfoShow = data;
    },
    setvisitExhibitsInfoShow(data: boolean) {
      this.visitExhibitsInfoShow = data;
    },
    setDescriptionExhibitsInfoShow(data: boolean) {
      this.descriptionExhibitsInfoShow = data;
    },
    setUploadModel() {
      this.uploadModel = !this.uploadModel;
    },
    setdrawerShow(data: boolean) {
      this.drawerShow = data;
    },
    setLinkType(data: boolean) {
      this.linkType = data;
    },
    setTeplateType(data: number) {
      this.templateType = data;
    },
    settemplateUnitType(e: boolean) {
      this.templateUnitType = e;
    },
    setstyleInfo(data: any) {
      this.styleInfo.logo = data.logo;
      this.styleInfo.moduleList = data.moduleList;
      this.styleInfo.id = data.id;
      this.styleInfo.projectId = data.projectId;
      this.styleInfo.themeColor = data.themeColor ? data.themeColor : '#CFBDA8';
      this.styleInfo.auxiliaryColor = data.auxiliaryColor ? data.auxiliaryColor : '#F0E9E1';
      this.styleInfo.background = data.background ? data.background : '#FAF9F7';
      this.styleInfo.shmentColor = data.shmentColor ? data.shmentColor : '#D2AD77';
      this.styleInfo.fontColor = data.fontColor ? data.fontColor : '#333';
      this.styleInfo.fontFamily = data.fontFamily ? data.fontFamily : 'SourceHanSerifCN';
      this.styleInfo.textFamily = data.textFamily ? data.textFamily : 'SourceHanSerifCN';
      this.styleInfo.sizeType = data.sizeType ? data.sizeType : 1;
      this.styleInfo.contentSize = '16px';
      this.styleInfo.titleSize = '34px';
      this.styleInfo.mintitleSize = '20px';
      this.styleInfo.styleType = data.styleType ? data.styleType : 1;
      this.styleInfo.wapBanners = data.wapBanners;
      if (data.banners) {
        this.styleInfo.banners = [];
        data.banners.forEach((element) => {
          if (element.url) {
            this.styleInfo.banners.push(element);
          }
        });
      } else {
        this.styleInfo.banners = [];
      }
      // this.styleInfo.banners = data.banners ? data.banners : [];
      this.styleInfo.colorType = data.colorType ? data.colorType : 1;
      console.log('moduleList', this.styleInfo.moduleList);
    },
    setstyleInfoModel(data) {
      this.styleInfo.moduleList = data;
    },
    setColorType(data: number) {
      this.styleInfo.colorType = data;
    },
    setchildModel(styleInfo: any) {
      this.childModel = styleInfo;
    },
    setglanceOver() {
      this.glanceOver = !this.glanceOver;
    },
    setColor(data: any) {
      this.styleInfo.themeColor = data.themeColor;
      this.styleInfo.auxiliaryColor = data.auxiliaryColor;
      this.styleInfo.background = data.background;
      this.styleInfo.shmentColor = data.shmentColor;
      this.styleInfo.fontColor = data.fontColor;
      this.styleInfo.colorType = data.id;
    },
    setFontsize(data: any) {
      this.styleInfo.contentSize = data.contentSize;
      this.styleInfo.titleSize = data.titleSize;
      this.styleInfo.mintitleSize = data.mintitleSize;
    },
    setFontFamily(data: any, type: number) {
      if (type === 1) {
        this.styleInfo.fontFamily = data;
      } else {
        this.styleInfo.textFamily = data;
      }
    },
    setBanner(data: any) {
      this.styleInfo.banners = data;
    },
    setWapBanner(data: any) {
      this.styleInfo.wapBanners = data;
    },
    setLogo(data: any) {
      this.styleInfo.logo = data;
    },
    setStypeType(data: any) {
      this.styleInfo.styleType = data.id;
    },
    setProjectData(data: projectData) {
      this.projectInfo = data;
    },
    setProjectRole(data: number) {
      this.projectRole = data;
    },
    setCurrent(data: number) {
      this.current = data;
    },
    setTemplate6MenuType(e: number) {
      this.Template6MenuType = e;
    },
    setTemplate6MenuCurrent(e: number) {
      this.Template6MenuCurrent = e;
    },
    setwapBiographyMenuType(e: number) {
      this.wapBiographyMenuType = e;
    },
    setStsyCurrent(e: number) {
      this.stsyCurrent = e;
    },
    setPaintingCurrent(e: number) {
      this.paintingCurrent = e;
    },
  },
  persist: true,
});
